#include <bits/stdc++.h>
using namespace std;

const int N = 1e5+5;
int n, a[N];

int main() {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    sort(a + 1, a + n + 1);
    int ans = 0, cur = 0;
    for (int i = 1; i <= n + 1; ans = max(ans - 1, 0), i++)
        if (a[i] != a[i-1]) ans += cur, cur = 1;
        else cur++;
    cout << ans + cur;
    return 0;
}